<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'My Web Application',

	// preloading 'log' component
	'preload'=>array('log', 'session', 'authManager'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),
        'params'=>require(dirname(__FILE__).'/params.php'),

	// application components
	'components'=>array(
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning, info',
				),
			),
		),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>false,
		),
		'db'=>array(
			//'connectionString'=>'mysql:host=localhost;dbname=books', 'username'=>'root', 'password'=>'rktjgfnhf'
                        'connectionString'=>'mysql:host=localhost;dbname=ctnet_books', 'username'=>'ctnet_books', 'password'=>'g3BI~RihlqBH'
                ),
                'session' => array(
                    'class' => 'CBSession',
                    'connectionID'=>'db',
                    'timeout' => 900
                ),
                'authManager' => array(
                    'class' => 'CBAuthManager',
                    'connectionID'=>'db',
                    'defaultRoles'=>array('user', 'guest')
                ),
                'mailer' => array(
                    'class' => 'ext.swiftmailer.CSwiftMailer',
                    'local' => true,
                    'fromEmail' => 'dontreplay@books.creative-territory.net'
                )
	),
        'modules' => array (
            'srbac' => array(
                // Your application's user class (default: User)
                "userclass"=>"User",
                // Your users' table user_id column (default: userid)
                "userid"=>"id",
                // your users' table username column (default: username)
                "username"=>"email",
                // If in debug mode (default: false)
                // In debug mode every user (even guest) can admin srbac, also
                //if you use internationalization untranslated words/phrases
                //will be marked with a red star
                "debug"=>true,
                // The number of items shown in each page (default:15)
                "pageSize"=>25,
                // The name of the super user
                "superUser" =>"admin@domain.com"
            )
        )
);